package com.leetcode.LC;

import java.util.Arrays;

public class LC453 {
    public int minMoves(int[] nums) {
//n-1个少数民族加分相当于1个民族扣分
        int count = 0;
        Arrays.sort(nums);
        for (int num : nums) {
            count += num - nums[0];
        }
        return count;
    }

    public static void main(String[] args) {
        System.out.println(new LC453().minMoves(new int[]{1, 2, 3}));
    }
}
